<?php

chdir('../');

require('includes/setUp.php');
  
/**
 * TODO: user check, data check
 */
try {

  if ($user == null) {
    globalFunc::redirect(WebRoot.'index.php?errMsg='.rawurlencode(T_('You have to be logged on!')));
  }
  
  $user->removeFavoriteUser($db->find('User',$_GET['id']));
  $db->flush();

} catch (Exception $ex) {
  globalFunc::redirect(WebRoot.'index.php?errMsg='.rawurlencode($ex->getMessage()));
}

globalFunc::redirect();
